const query = require('./db')
const bannerImg = [
  { id: 0, imgUrl: '/images/01.jpg' },
  { id: 0, imgUrl: '/images/01.jpg' },
  { id: 0, imgUrl: '/images/01.jpg' }
]

bannerImg.map(item => {
  let { id: imgId, imgUrl } = item
  let sql = `INSERT INTO banner VALUES(${imgId},"${imgUrl}")`
  query(sql, (err, data) => {
    console.log(data)
  })
})
